package com.heima.user.controller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.user.service.ApExcelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author huan
 * @serial 每天一百行, 致敬未来的自己
 * @Description
 */
@RestController
@Api(value = "Ap用户Excel操作API", tags = "Ap用户Excel操作API")
@RequestMapping("/api/v1/apex")
public class ApExcelController {
    @Autowired
    ApExcelService apExcelService;

    @PostMapping("/import")
    @ApiOperation("用户批量导入")
    public ResponseResult uploadFile(@RequestParam("file") MultipartFile file) {
        return apExcelService.bulkImport(file);
    }
}
